﻿#region

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Vin.Extension.Framework.Signals.Options;
using Vin.Extension.Framework.Signals.ServiceInterface;
using Vin.Tool.AspNetCore.Singleton;
using Vin.Tool.Core.AssertCategory;

#endregion

namespace Vin.Extension.Framework.Signals;

public class ExtensionEntry : IVinExtension
{
    public void AddVinExtension(WebApplicationBuilder builder)
    {
    }

    public void AddVinExtension(IServiceCollection services)
    {
    }

    public void UseVinExtension(WebApplication app)
    {
        var option = VinApp.GetConfig<SignalsOption>();
        if (option.Routes.Count > 0) SignalsEndpoint.UseSignalsRoute(app, option.Routes);
    }
}